home *** CD-ROM | disk | FTP | other *** search
- %%BeginFile: lw8_level1_basicimages-2.0
- /$i F def
- /flipinvert
- statusdict begin
- version cvr 47.0 lt
- end
- def
- /iw Z
- /ih Z
- /im_save Z
- /setupimageproc Z
- /polarity Z
- /smoothflag Z
- /$z Z
- /bpc Z
- /smooth_moredata Z
- /datatype Z
- /xtraData Z
- /:f
- {
- /im_save save store
- /xtraData xs
- /datatype xs
- $i flipinvert
- and
- xor
- /polarity xs
- /smoothflag xs
- dup aload pop
- transform
- round 0.5 sub exch
- round 0.5 sub exch
- itransform
- 7 -1 roll astore
- concat
- xtraData
- {
- 0 0 1 1
- 1 1 idtransform abs exch pop
- add
- rC
- }if
- /$z exch string store
- /bpc xs
- xtraData{4 add}if
- /ih xs
- /iw xs
- /smoothflag
- smoothflag
- bpc 1 eq and
- smoothflag and
- userdict/sc_smooth known and
- vmstatus pop exch pop iw 3 mul sub 1000 gt and
- iw 4 mul 7 add 8 idiv 4 mul 65535 le and
- store
- smoothflag{
- iw
- ih
- $z
- iw 7 add 8 idiv 4 mul string
- iw 4 mul 7 add 8 idiv 4 mul string
- T
- F
- sc_initsmooth
- /iw iw 4 mul store
- /ih ih 4 mul store
- }if
- /setupimageproc datatype 0 eq datatype 1 eq or{
- smoothflag{
- {
- [
- /smooth_moredata cvx[
- currentfile
- $z
- {readstring readhexstring}datatype get
- /pop cvx
- ]cvx[
- $z
- ]cvx/ifelse cvx
- /sc_smooth cvx
- /smooth_moredata/exch cvx/store cvx
- ]cvx bind
- /smooth_moredata T store
- dup exec pop dup exec pop
- }
- }{
- {
- [
- currentfile
- $z
- {readstring readhexstring}datatype get
- /pop cvx
- ]cvx bind
- }
- }ifelse
- }{
- (error, can't use level2 data acquisition procs for level1)print flush stop
- }ifelse
- store
- }bd
- /mkimgmtx
- {
- xtraData
- {
- smoothflag
- {
- [iw 0 0 ih 16 sub 0 8]
- }{
- [iw 0 0 ih 4 sub 0 2]
- }ifelse
- }{
- [iw 0 0 ih 0 0]
- }ifelse
- }bd
- /do1img
- {
- iw ih
- polarity
- mkimgmtx
- setupimageproc
- imagemask
- }bd
- /:j{im_save restore}bd
- /:g
- {
- 1 setgray
- 0
- 1 1 idtransform abs exch pop
- 1 1
- rF
- 0 setgray
- do1img
- }bd
- /:h
- {
- :Fx
- 0
- 1 1 idtransform abs exch pop
- 1 1
- rF
- :Fx
- do1img
- }bd
- /:i
- {
- :Fx
- do1img
- }bd
- %%EndFile
-